package com.rtx.wms.std.cc.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.rtx.api.annotation.DataSourceAnnotation;
import com.rtx.wms.std.cc.bean.ApiCcList;
import com.rtx.wms.std.cc.mapper.ApiCcListMapper;
import com.rtx.wms.std.cc.service.ApiCcListService;

import cn.hutool.core.lang.UUID;
import cn.hutool.core.util.IdUtil;

@Service
public class ApiCcListServiceImpl extends ServiceImpl<ApiCcListMapper, ApiCcList> implements ApiCcListService{

	@DataSourceAnnotation
	@Override
	public void insert(String datasourcekey, ApiCcList data) {
		String uid = IdUtil.getSnowflakeNextIdStr();
		data.setBatchid(uid);
		this.save(data);
	}

	@DataSourceAnnotation
	@Override
	public List<ApiCcList> queryByCondition(String datasourcekey, Wrapper<ApiCcList> query) {
		return this.list(query);
	}

	@DataSourceAnnotation
	@Override
	public void updStatus(String datasourcekey, Wrapper<ApiCcList> upd) {
		this.update(upd);
	}

}
